﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Commons;

namespace Web.controls
{
    public partial class message : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 消息类型 attention注意 information信息 success成功 error错误
        /// </summary>
        public UCMessageType InfoType
        {
            get
            {
                if (ViewState["message_InfoType_so3ehgu"] != null)
                    return (UCMessageType)Enum.Parse(typeof(UCMessageType), ViewState["message_InfoType_so3ehgu"].ToString());
                else
                    return UCMessageType.information;
            }
            set
            {
                ViewState["message_InfoType_so3ehgu"] = value;
            }
        }

        public string Message
        {
            get
            {
                if (ViewState["message_Message_so3ehgu"] != null)
                    return StrUtil.FormatValue(ViewState["message_Message_so3ehgu"]);
                else
                    return "";
            }
            set
            {
                ViewState["message_Message_so3ehgu"] = value;
            }
        }
    }

    /// <summary>
    /// 消息类型 attention注意 information信息 success成功 error错误
    /// </summary>
    public enum UCMessageType
    {
        /// <summary>
        /// 注意
        /// </summary>
        attention,
        /// <summary>
        /// 信息
        /// </summary>
        information,
        /// <summary>
        /// 成功
        /// </summary>
        success,
        /// <summary>
        /// 错误
        /// </summary>
        error
    }
}